package com.lantosec.hmrp.modules.notify.entity;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.notify.vo.NotifyTypeVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 通知分类 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-05-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class NotifyType extends BaseEntity<NotifyTypeVO> {

    private static final long serialVersionUID = 1L;
    public NotifyType(NotifyTypeVO vo){
        this.notifyTypeId = vo.getNotifyTypeId();
        this.notifyType = vo.getNotifyType();
        this.parentId = vo.getParentId();
    }

    @Override
    public NotifyTypeVO convertToVO(){
        return new NotifyTypeVO(this);
    }


    /**
     * 通知类型ID
     */
    @TableId(value = "notify_type_id", type = IdType.ASSIGN_UUID)
    private String notifyTypeId;

    /**
     * 通知类型
     */
    private String notifyType;

    /**
     * 上级ID
     */
    private String parentId;


    public enum ColName {
        notify_type_id, notify_type, parent_id, 
    }
}
